
<template>
  <div class="HomeBox">
    <homeHead></homeHead>
    <div class="app_content">
      <leftNavigation></leftNavigation>
      <div class="view_content">
        <router-view></router-view>
      </div>
    </div>

  </div>
</template>


<script>
  import homeHead from './home/homeHead.vue';
  import leftNavigation from './home/leftNavigation.vue';
  export default {
    data () {
      return {
        userInfo: {
          userName: 'admin',
          passWorld: 123456
        },
        rules: {
          user: [
            { required: true, message: '请输入登录名', trigger: 'blur' }
          ],
          pass: [
            { required: true, message: '请输入密码', trigger: 'blur' }
          ]
        }
      };
    },
    methods: {
      // 登录
      login (formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            this.$notify({
              title: '成功',
              message: '这是一条成功的提示消息',
              type: 'success'
            });
            this.$router.push({name: 'home', path: '/home'});
            alert('submit!');
          } else {
            this.$notify.error({
              title: '错误',
              message: '密码或用户名错误'
            });
            return false;
          }
        });
      }
    },
    components: {homeHead, leftNavigation},
    created: function () {
    }
  };
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .app_content{
    width: 100%;
    height: 100%;
    box-sizing: border-box;
  }
  .view_content {
    height: 100%;
    padding-left: 20px;
    margin-left: 250px;
    background: #fff;
    overflow-y: scroll;
  }


</style>
